package com.zjhn.ds.netty;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;

/**
 * @BelongsProject: ds_jlw
 * @BelongsPackage: com.zjhn.ds.netty
 * @Author: sxt
 * @CreateTime: 2023-09-20  10:19
 * @Description:
 * @Version: 1.0
 */
@Configuration
public class InitNettyServerConfig implements CommandLineRunner {


    @Autowired
    private NettyServer nettyServer;

    @Autowired
    public void setNettyServer(NettyServer nettyServer) {
        this.nettyServer = nettyServer;
    }

    @Override
    public void run(String... args) throws Exception {
        nettyServer.start();
    }
}

